package com.hg.concurent.demo2;

import java.util.Random;
import java.util.concurrent.ArrayBlockingQueue;

/**
 * @Author: skh
 * @Date: 2019/10/17 16:48
 * @Description:
 */
public class Client {

    public static void main(String[] args) {
        ArrayBlockingQueue<Integer> blockingQueue = new ArrayBlockingQueue<>(100);
        for (int i = 0; i < 5; i++) {
            new Thread(new Producer(blockingQueue)).start();

        }
        for (int i = 0; i < 2; i++) {
            new Thread(new Consumer(blockingQueue)).start();
        }

    }
}
